package org.javaboy.fmall.utils.returnTool;

/**
 * @ClassName ColeMessage 自定义错误枚举类
 * @Description
 * @Author find me
 * @Date 2020/7/19 0019 14:41
 * @Version 1.0
 */
public enum ColeMessage  {
    SUCCESS(200, "成功"),
    SUCCESS_ASYNC(202, "一个请求已经进入后台排队（异步任务）"),
    SUCCESS_DEL(204, "删除数据成功"),
    NO_ACCESS(401, "用户没有权限（令牌、用户名、密码错误）"),
    NOT_FIND(404, "资源不存在"),
    gg(500, "系统错误！"),
    ERROR(-1, "服务发生错误"),
    WARNING(-2, "服务发生错误"),
    ERROR_GATEWAY(502, "网关错误"),
    SERVER_NOT_AVAILABLE(503, "服务不可用，服务器暂时过载或维护"),
    GATEWAY_TIMEOUT(504, "网关超时");

    private int code;
    private String message;

    ColeMessage(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public  int getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }
}
